package com.yunnuo.system.operlog.controller;

import com.yunnuo.system.operlog.service.ILogininforService;
import com.yunnuo.system.comm.controller.BaseController;
import com.yunnuo.system.comm.util.page.TableDataInfo;
import com.yunnuo.system.users.entity.PageParams;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 登录信息
 * @author 魏洪福（15064000912@163.com）
 * @create 2018-08-31-15:27
 */
@Controller
@RequestMapping("/monitor/logininfor")
public class LogininforController extends BaseController{

    private String prefix = "monitor/logininfor";

    @Autowired
    private ILogininforService logininforService;



    @GetMapping()
    public String operlog()
    {
        return prefix + "/logininfor";
    }

    /**
     * 分页查询
     * @param pageParams
     * @return
     */
    @RequiresPermissions("monitor:logininfor:list")
    @GetMapping("/list")
    @ResponseBody
    public TableDataInfo list(PageParams pageParams)
    {
        return logininforService.selecLogininforByPageParams(pageParams,startPage(pageParams));
    }
}
